
/*
'===============================================================================
'  Generated From - CSharp_dOOdads_BusinessEntity.vbgen
' 
'  ** IMPORTANT  ** 
'  How to Generate your stored procedures:
' 
'  SQL        = SQL_StoredProcs.vbgen
'  ACCESS     = Access_StoredProcs.vbgen
'  ORACLE     = Oracle_StoredProcs.vbgen
'  FIREBIRD   = FirebirdStoredProcs.vbgen
'  POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
'  The supporting base class SqlClientEntity is in the Architecture directory in "dOOdads".
'  
'  This object is 'abstract' which means you need to inherit from it to be able
'  to instantiate it.  This is very easilly done. You can override properties and
'  methods in your derived class, this allows you to regenerate this class at any
'  time and not worry about overwriting custom code. 
'
'  NEVER EDIT THIS FILE.
'
'  public class YourObject :  _YourObject
'  {
'
'  }
'
'===============================================================================
*/

// Generated by MyGeneration Version # (1.3.0.3)

using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using System.Collections.Specialized;

using MyGeneration.dOOdads;

namespace ShopOnline.DAL
{
	public abstract class _BusinessCards : SqlClientEntity
	{
		public _BusinessCards()
		{
			this.QuerySource = "BusinessCards";
			this.MappingName = "BusinessCards";

		}	

		//=================================================================
		//  public Overrides void AddNew()
		//=================================================================
		//
		//=================================================================
		public override void AddNew()
		{
			base.AddNew();
			
		}
		
		
		public override void FlushData()
		{
			this._whereClause = null;
			this._aggregateClause = null;
			base.FlushData();
		}
		
		//=================================================================
		//  	public Function LoadAll() As Boolean
		//=================================================================
		//  Loads all of the records in the database, and sets the currentRow to the first row
		//=================================================================
		public bool LoadAll() 
		{
			ListDictionary parameters = null;
			
			return base.LoadFromSql("[" + this.SchemaStoredProcedure + "proc_BusinessCardsLoadAll]", parameters);
		}
	
		//=================================================================
		// public Overridable Function LoadByPrimaryKey()  As Boolean
		//=================================================================
		//  Loads a single row of via the primary key
		//=================================================================
		public virtual bool LoadByPrimaryKey(int ID)
		{
			ListDictionary parameters = new ListDictionary();
			parameters.Add(Parameters.ID, ID);

		
			return base.LoadFromSql("[" + this.SchemaStoredProcedure + "proc_BusinessCardsLoadByPrimaryKey]", parameters);
		}
		
		#region Parameters
		protected class Parameters
		{
			
			public static SqlParameter ID
			{
				get
				{
					return new SqlParameter("@ID", SqlDbType.Int, 0);
				}
			}
			
			public static SqlParameter FrontSide
			{
				get
				{
					return new SqlParameter("@FrontSide", SqlDbType.NVarChar, 1073741823);
				}
			}
			
			public static SqlParameter BackSide
			{
				get
				{
					return new SqlParameter("@BackSide", SqlDbType.NVarChar, 1073741823);
				}
			}
			
			public static SqlParameter Deleted
			{
				get
				{
					return new SqlParameter("@Deleted", SqlDbType.Bit, 0);
				}
			}
			
			public static SqlParameter CreatedDate
			{
				get
				{
					return new SqlParameter("@CreatedDate", SqlDbType.DateTime, 0);
				}
			}
			
			public static SqlParameter Status
			{
				get
				{
					return new SqlParameter("@Status", SqlDbType.Int, 0);
				}
			}
			
			public static SqlParameter CreatedByCustomer
			{
				get
				{
					return new SqlParameter("@CreatedByCustomer", SqlDbType.Int, 0);
				}
			}
			
			public static SqlParameter CreatedByAdmin
			{
				get
				{
					return new SqlParameter("@CreatedByAdmin", SqlDbType.Int, 0);
				}
			}
			
		}
		#endregion		
	
		#region ColumnNames
		public class ColumnNames
		{  
            public const string ID = "ID";
            public const string FrontSide = "FrontSide";
            public const string BackSide = "BackSide";
            public const string Deleted = "Deleted";
            public const string CreatedDate = "CreatedDate";
            public const string Status = "Status";
            public const string CreatedByCustomer = "CreatedByCustomer";
            public const string CreatedByAdmin = "CreatedByAdmin";

			static public string ToPropertyName(string columnName)
			{
				if(ht == null)
				{
					ht = new Hashtable();
					
					ht[ID] = _BusinessCards.PropertyNames.ID;
					ht[FrontSide] = _BusinessCards.PropertyNames.FrontSide;
					ht[BackSide] = _BusinessCards.PropertyNames.BackSide;
					ht[Deleted] = _BusinessCards.PropertyNames.Deleted;
					ht[CreatedDate] = _BusinessCards.PropertyNames.CreatedDate;
					ht[Status] = _BusinessCards.PropertyNames.Status;
					ht[CreatedByCustomer] = _BusinessCards.PropertyNames.CreatedByCustomer;
					ht[CreatedByAdmin] = _BusinessCards.PropertyNames.CreatedByAdmin;

				}
				return (string)ht[columnName];
			}

			static private Hashtable ht = null;			 
		}
		#endregion
		
		#region PropertyNames
		public class PropertyNames
		{  
            public const string ID = "ID";
            public const string FrontSide = "FrontSide";
            public const string BackSide = "BackSide";
            public const string Deleted = "Deleted";
            public const string CreatedDate = "CreatedDate";
            public const string Status = "Status";
            public const string CreatedByCustomer = "CreatedByCustomer";
            public const string CreatedByAdmin = "CreatedByAdmin";

			static public string ToColumnName(string propertyName)
			{
				if(ht == null)
				{
					ht = new Hashtable();
					
					ht[ID] = _BusinessCards.ColumnNames.ID;
					ht[FrontSide] = _BusinessCards.ColumnNames.FrontSide;
					ht[BackSide] = _BusinessCards.ColumnNames.BackSide;
					ht[Deleted] = _BusinessCards.ColumnNames.Deleted;
					ht[CreatedDate] = _BusinessCards.ColumnNames.CreatedDate;
					ht[Status] = _BusinessCards.ColumnNames.Status;
					ht[CreatedByCustomer] = _BusinessCards.ColumnNames.CreatedByCustomer;
					ht[CreatedByAdmin] = _BusinessCards.ColumnNames.CreatedByAdmin;

				}
				return (string)ht[propertyName];
			}

			static private Hashtable ht = null;			 
		}			 
		#endregion	

		#region StringPropertyNames
		public class StringPropertyNames
		{  
            public const string ID = "s_ID";
            public const string FrontSide = "s_FrontSide";
            public const string BackSide = "s_BackSide";
            public const string Deleted = "s_Deleted";
            public const string CreatedDate = "s_CreatedDate";
            public const string Status = "s_Status";
            public const string CreatedByCustomer = "s_CreatedByCustomer";
            public const string CreatedByAdmin = "s_CreatedByAdmin";

		}
		#endregion		
		
		#region Properties
	
		public virtual int ID
	    {
			get
	        {
				return base.Getint(ColumnNames.ID);
			}
			set
	        {
				base.Setint(ColumnNames.ID, value);
			}
		}

		public virtual string FrontSide
	    {
			get
	        {
				return base.Getstring(ColumnNames.FrontSide);
			}
			set
	        {
				base.Setstring(ColumnNames.FrontSide, value);
			}
		}

		public virtual string BackSide
	    {
			get
	        {
				return base.Getstring(ColumnNames.BackSide);
			}
			set
	        {
				base.Setstring(ColumnNames.BackSide, value);
			}
		}

		public virtual bool Deleted
	    {
			get
	        {
				return base.Getbool(ColumnNames.Deleted);
			}
			set
	        {
				base.Setbool(ColumnNames.Deleted, value);
			}
		}

		public virtual DateTime CreatedDate
	    {
			get
	        {
				return base.GetDateTime(ColumnNames.CreatedDate);
			}
			set
	        {
				base.SetDateTime(ColumnNames.CreatedDate, value);
			}
		}

		public virtual int Status
	    {
			get
	        {
				return base.Getint(ColumnNames.Status);
			}
			set
	        {
				base.Setint(ColumnNames.Status, value);
			}
		}

		public virtual int CreatedByCustomer
	    {
			get
	        {
				return base.Getint(ColumnNames.CreatedByCustomer);
			}
			set
	        {
				base.Setint(ColumnNames.CreatedByCustomer, value);
			}
		}

		public virtual int CreatedByAdmin
	    {
			get
	        {
				return base.Getint(ColumnNames.CreatedByAdmin);
			}
			set
	        {
				base.Setint(ColumnNames.CreatedByAdmin, value);
			}
		}


		#endregion
		
		#region String Properties
	
		public virtual string s_ID
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.ID) ? string.Empty : base.GetintAsString(ColumnNames.ID);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.ID);
				else
					this.ID = base.SetintAsString(ColumnNames.ID, value);
			}
		}

		public virtual string s_FrontSide
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.FrontSide) ? string.Empty : base.GetstringAsString(ColumnNames.FrontSide);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.FrontSide);
				else
					this.FrontSide = base.SetstringAsString(ColumnNames.FrontSide, value);
			}
		}

		public virtual string s_BackSide
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.BackSide) ? string.Empty : base.GetstringAsString(ColumnNames.BackSide);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.BackSide);
				else
					this.BackSide = base.SetstringAsString(ColumnNames.BackSide, value);
			}
		}

		public virtual string s_Deleted
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.Deleted) ? string.Empty : base.GetboolAsString(ColumnNames.Deleted);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.Deleted);
				else
					this.Deleted = base.SetboolAsString(ColumnNames.Deleted, value);
			}
		}

		public virtual string s_CreatedDate
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.CreatedDate) ? string.Empty : base.GetDateTimeAsString(ColumnNames.CreatedDate);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.CreatedDate);
				else
					this.CreatedDate = base.SetDateTimeAsString(ColumnNames.CreatedDate, value);
			}
		}

		public virtual string s_Status
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.Status) ? string.Empty : base.GetintAsString(ColumnNames.Status);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.Status);
				else
					this.Status = base.SetintAsString(ColumnNames.Status, value);
			}
		}

		public virtual string s_CreatedByCustomer
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.CreatedByCustomer) ? string.Empty : base.GetintAsString(ColumnNames.CreatedByCustomer);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.CreatedByCustomer);
				else
					this.CreatedByCustomer = base.SetintAsString(ColumnNames.CreatedByCustomer, value);
			}
		}

		public virtual string s_CreatedByAdmin
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.CreatedByAdmin) ? string.Empty : base.GetintAsString(ColumnNames.CreatedByAdmin);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.CreatedByAdmin);
				else
					this.CreatedByAdmin = base.SetintAsString(ColumnNames.CreatedByAdmin, value);
			}
		}


		#endregion		
	
		#region Where Clause
		public class WhereClause
		{
			public WhereClause(BusinessEntity entity)
			{
				this._entity = entity;
			}
			
			public TearOffWhereParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffWhereParameter(this);
					}

					return _tearOff;
				}
			}

			#region WhereParameter TearOff's
			public class TearOffWhereParameter
			{
				public TearOffWhereParameter(WhereClause clause)
				{
					this._clause = clause;
				}
				
				
				public WhereParameter ID
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.ID, Parameters.ID);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter FrontSide
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.FrontSide, Parameters.FrontSide);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter BackSide
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.BackSide, Parameters.BackSide);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter Deleted
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.Deleted, Parameters.Deleted);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter CreatedDate
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.CreatedDate, Parameters.CreatedDate);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter Status
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.Status, Parameters.Status);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter CreatedByCustomer
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.CreatedByCustomer, Parameters.CreatedByCustomer);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter CreatedByAdmin
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.CreatedByAdmin, Parameters.CreatedByAdmin);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}


				private WhereClause _clause;
			}
			#endregion
		
			public WhereParameter ID
		    {
				get
		        {
					if(_ID_W == null)
	        	    {
						_ID_W = TearOff.ID;
					}
					return _ID_W;
				}
			}

			public WhereParameter FrontSide
		    {
				get
		        {
					if(_FrontSide_W == null)
	        	    {
						_FrontSide_W = TearOff.FrontSide;
					}
					return _FrontSide_W;
				}
			}

			public WhereParameter BackSide
		    {
				get
		        {
					if(_BackSide_W == null)
	        	    {
						_BackSide_W = TearOff.BackSide;
					}
					return _BackSide_W;
				}
			}

			public WhereParameter Deleted
		    {
				get
		        {
					if(_Deleted_W == null)
	        	    {
						_Deleted_W = TearOff.Deleted;
					}
					return _Deleted_W;
				}
			}

			public WhereParameter CreatedDate
		    {
				get
		        {
					if(_CreatedDate_W == null)
	        	    {
						_CreatedDate_W = TearOff.CreatedDate;
					}
					return _CreatedDate_W;
				}
			}

			public WhereParameter Status
		    {
				get
		        {
					if(_Status_W == null)
	        	    {
						_Status_W = TearOff.Status;
					}
					return _Status_W;
				}
			}

			public WhereParameter CreatedByCustomer
		    {
				get
		        {
					if(_CreatedByCustomer_W == null)
	        	    {
						_CreatedByCustomer_W = TearOff.CreatedByCustomer;
					}
					return _CreatedByCustomer_W;
				}
			}

			public WhereParameter CreatedByAdmin
		    {
				get
		        {
					if(_CreatedByAdmin_W == null)
	        	    {
						_CreatedByAdmin_W = TearOff.CreatedByAdmin;
					}
					return _CreatedByAdmin_W;
				}
			}

			private WhereParameter _ID_W = null;
			private WhereParameter _FrontSide_W = null;
			private WhereParameter _BackSide_W = null;
			private WhereParameter _Deleted_W = null;
			private WhereParameter _CreatedDate_W = null;
			private WhereParameter _Status_W = null;
			private WhereParameter _CreatedByCustomer_W = null;
			private WhereParameter _CreatedByAdmin_W = null;

			public void WhereClauseReset()
			{
				_ID_W = null;
				_FrontSide_W = null;
				_BackSide_W = null;
				_Deleted_W = null;
				_CreatedDate_W = null;
				_Status_W = null;
				_CreatedByCustomer_W = null;
				_CreatedByAdmin_W = null;

				this._entity.Query.FlushWhereParameters();

			}
	
			private BusinessEntity _entity;
			private TearOffWhereParameter _tearOff;
			
		}
	
		public WhereClause Where
		{
			get
			{
				if(_whereClause == null)
				{
					_whereClause = new WhereClause(this);
				}
		
				return _whereClause;
			}
		}
		
		private WhereClause _whereClause = null;	
		#endregion
	
		#region Aggregate Clause
		public class AggregateClause
		{
			public AggregateClause(BusinessEntity entity)
			{
				this._entity = entity;
			}
			
			public TearOffAggregateParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffAggregateParameter(this);
					}

					return _tearOff;
				}
			}

			#region AggregateParameter TearOff's
			public class TearOffAggregateParameter
			{
				public TearOffAggregateParameter(AggregateClause clause)
				{
					this._clause = clause;
				}
				
				
				public AggregateParameter ID
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.ID, Parameters.ID);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter FrontSide
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.FrontSide, Parameters.FrontSide);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter BackSide
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.BackSide, Parameters.BackSide);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter Deleted
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.Deleted, Parameters.Deleted);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter CreatedDate
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.CreatedDate, Parameters.CreatedDate);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter Status
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.Status, Parameters.Status);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter CreatedByCustomer
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.CreatedByCustomer, Parameters.CreatedByCustomer);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter CreatedByAdmin
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.CreatedByAdmin, Parameters.CreatedByAdmin);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}


				private AggregateClause _clause;
			}
			#endregion
		
			public AggregateParameter ID
		    {
				get
		        {
					if(_ID_W == null)
	        	    {
						_ID_W = TearOff.ID;
					}
					return _ID_W;
				}
			}

			public AggregateParameter FrontSide
		    {
				get
		        {
					if(_FrontSide_W == null)
	        	    {
						_FrontSide_W = TearOff.FrontSide;
					}
					return _FrontSide_W;
				}
			}

			public AggregateParameter BackSide
		    {
				get
		        {
					if(_BackSide_W == null)
	        	    {
						_BackSide_W = TearOff.BackSide;
					}
					return _BackSide_W;
				}
			}

			public AggregateParameter Deleted
		    {
				get
		        {
					if(_Deleted_W == null)
	        	    {
						_Deleted_W = TearOff.Deleted;
					}
					return _Deleted_W;
				}
			}

			public AggregateParameter CreatedDate
		    {
				get
		        {
					if(_CreatedDate_W == null)
	        	    {
						_CreatedDate_W = TearOff.CreatedDate;
					}
					return _CreatedDate_W;
				}
			}

			public AggregateParameter Status
		    {
				get
		        {
					if(_Status_W == null)
	        	    {
						_Status_W = TearOff.Status;
					}
					return _Status_W;
				}
			}

			public AggregateParameter CreatedByCustomer
		    {
				get
		        {
					if(_CreatedByCustomer_W == null)
	        	    {
						_CreatedByCustomer_W = TearOff.CreatedByCustomer;
					}
					return _CreatedByCustomer_W;
				}
			}

			public AggregateParameter CreatedByAdmin
		    {
				get
		        {
					if(_CreatedByAdmin_W == null)
	        	    {
						_CreatedByAdmin_W = TearOff.CreatedByAdmin;
					}
					return _CreatedByAdmin_W;
				}
			}

			private AggregateParameter _ID_W = null;
			private AggregateParameter _FrontSide_W = null;
			private AggregateParameter _BackSide_W = null;
			private AggregateParameter _Deleted_W = null;
			private AggregateParameter _CreatedDate_W = null;
			private AggregateParameter _Status_W = null;
			private AggregateParameter _CreatedByCustomer_W = null;
			private AggregateParameter _CreatedByAdmin_W = null;

			public void AggregateClauseReset()
			{
				_ID_W = null;
				_FrontSide_W = null;
				_BackSide_W = null;
				_Deleted_W = null;
				_CreatedDate_W = null;
				_Status_W = null;
				_CreatedByCustomer_W = null;
				_CreatedByAdmin_W = null;

				this._entity.Query.FlushAggregateParameters();

			}
	
			private BusinessEntity _entity;
			private TearOffAggregateParameter _tearOff;
			
		}
	
		public AggregateClause Aggregate
		{
			get
			{
				if(_aggregateClause == null)
				{
					_aggregateClause = new AggregateClause(this);
				}
		
				return _aggregateClause;
			}
		}
		
		private AggregateClause _aggregateClause = null;	
		#endregion
	
		protected override IDbCommand GetInsertCommand() 
		{
		
			SqlCommand cmd = new SqlCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_BusinessCardsInsert]";
	
			CreateParameters(cmd);
			
			SqlParameter p;
			p = cmd.Parameters[Parameters.ID.ParameterName];
			p.Direction = ParameterDirection.Output;
    
			return cmd;
		}
	
		protected override IDbCommand GetUpdateCommand()
		{
		
			SqlCommand cmd = new SqlCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_BusinessCardsUpdate]";
	
			CreateParameters(cmd);
			      
			return cmd;
		}
	
		protected override IDbCommand GetDeleteCommand()
		{
		
			SqlCommand cmd = new SqlCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_BusinessCardsDelete]";
	
			SqlParameter p;
			p = cmd.Parameters.Add(Parameters.ID);
			p.SourceColumn = ColumnNames.ID;
			p.SourceVersion = DataRowVersion.Current;

  
			return cmd;
		}
		
		private IDbCommand CreateParameters(SqlCommand cmd)
		{
			SqlParameter p;
		
			p = cmd.Parameters.Add(Parameters.ID);
			p.SourceColumn = ColumnNames.ID;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.FrontSide);
			p.SourceColumn = ColumnNames.FrontSide;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.BackSide);
			p.SourceColumn = ColumnNames.BackSide;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.Deleted);
			p.SourceColumn = ColumnNames.Deleted;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.CreatedDate);
			p.SourceColumn = ColumnNames.CreatedDate;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.Status);
			p.SourceColumn = ColumnNames.Status;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.CreatedByCustomer);
			p.SourceColumn = ColumnNames.CreatedByCustomer;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.CreatedByAdmin);
			p.SourceColumn = ColumnNames.CreatedByAdmin;
			p.SourceVersion = DataRowVersion.Current;


			return cmd;
		}
	}
}
